<!--************************************************************************************************-->
<!-- < addGroupResult.php >                                                                           -->
<!-- Copyright (c) 2012-2013 San Yat-sun University School of Software                              -->
<!-- Founder : Tianjiao Li                                                                          -->
<!-- Stu : 10389129                                                                                 -->
<!-- Date: 2012-12-18                                                                               -->
<!-- Destription : Add Group Result.                                                         -->
<!-- Basic: User:root                                                                               -->
<!--	    Password:                                                                               -->
<!-- Version : 2.1                                                                                  -->
<!-- LastUpdate : 2012-12-23 16:00 BY Tianjiaoli                                                    -->
<!--************************************************************************************************-->

<!DOCTYPE html>
<?php
	session_start();
?>
<html lang="zh-hk">
	<?php
	include_once("../db/GroupMa.php");
	//include_once("header.php");
	
	$flag = true;
	if( isset($_POST['username'])) 
	{
		$username = $_POST['username'];
		$groupMa = new Groupma(null);
		$groupMa -> addAMember($username);
		$group_name = $_POST['groupname'];
	}
	else
	{
		$flag = false;
		echo "Error: ".mysql_error();
	}
	
	
	?>
	
	<head>
		<meta http-equiv="Content-Type" content="text/html charset=UTF-8">
		<meta name="contentType" value="text/html  charset=GBK">
		<meta name="description" content="在这里你可以看到最新发布的书籍，和好友共享对某本书的评论和笔记">
		<meta http-equiv="imagetoolbar" content="no">
		<meta name="viewport" content="width=1036">
		
		<title>TINY bOOk</title>
		<link rel="stylesheet" type="text/css" href="../css/result.css"/> <!--==============modified by xiaoxin-->
		<link rel="shortcut icon" href="images/shortcut.jpg"/>
		
		<?php
		if ($flag)
		{
		?>
			<meta http-equiv="refresh" content="1; url=groupPage.php?group_name=<?=$group_name?>">
		<?php
		}
		?>
	</head>	
		
	<body>
		<div id="title">
			<h1>TINY bOOk</h1>
		</div>

		<?php
		if ($flag)
		{
		?>
			<div id="result">
				<p>已成功加入小组，跳转至小组页面</a></p>
			</div>
		<?php
		}
		else{
		?>
			<div id="result">
				<p>出错</a></p>
			</div>
		<?php
		}
		?>
		<div id="bottom">
				<p>@2012 - 2014 by cat-fish,all rights reserves</p>
		</div>
	</body>
</html>